package model

import (
	"time"
)

const DefineItemName = "define_item"

type DefineItem struct {
	Id              int               `json:"id" orm:"auto" sql:"INT"`
	Key             string            `json:"key" sql:"VARCHAR"`
	Name            map[string]string `json:"name" sql:"JSON"`
	Desc            map[string]string `json:"desc" sql:"JSON"`
	Type            byte              `json:"type" sql:"TINYINT"`
	Range           []int             `json:"range" sql:"JSON"`
	CanDefense      bool              `json:"can_defense" sql:"TINYINT"`
	DefendRange     byte              `json:"defend_range" sql:"TINYINT"`
	AttackRangeMask []uint            `json:"attack_range_mask" sql:"JSON"`
	Show            []interface{}     `json:"show" sql:"JSON"`
	SelfDestroy     bool              `json:"self_destroy" sql:"TINYINT"`
	NeedManage      bool              `json:"need_manage" sql:"TINYINT"`

	Receive DataRelationSlice `json:"receive" sql:"JSON"`
	Effect  DataRelationSlice `json:"effect" sql:"JSON"`

	SyncKeys    []string `json:"sync_keys" sql:"JSON"`
	SyncDefault []int    `json:"sync_default" sql:"JSON"`

	UpdateTime *time.Time `json:"update_time" orm:"updateTime" sql:"DATETIME"`
}
